Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Aug 2003
Posts: 160
ST
Offline
Junior Member
Junior Member
Offline
Joined: Aug 2003
Posts: 160
what is the "How to move from one host to another for dummies" procedure? I really cannot afford to lose posts.

FYI: I did a basic search and did not find an answer. I think I know how to do it, but as osme of you know, I am rather new at this and lack the confidence.

Please masters, help me.

Sponsored Links
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
Have a look at the guide from Infopop

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
I was going to post that link as a reply, but after reading that "guide", I'm not sure how helpful it really is.

Joined: Aug 2003
Posts: 160
ST
Offline
Junior Member
Junior Member
Offline
Joined: Aug 2003
Posts: 160
my new host allows telnet and shell access and has PHPadmin built in. My old host does not allow shell access and does not have PHP admin and it is not possible to install it now. (Old webmaster problem).

having said that, I am having a problem getting the restore function to work at the new server. I use the export function of MYSQL Front to get the tables to my HD in a nice file called DBNAME.SQL or something like that. I go to use the restore function of PHPadmin and it times out after about 15 minutes.

What can I do to remedy my conundrum?

Last edited by ST; 09/21/2003 11:19 PM.
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Is your new host Windows or Linux? If Linux, do you have access to use the mysql command when connected using telnet? If so, you can do the restore that way:

$ mysql -u USERNAME -p DBNAME < BACKUPFILE.sql

Sponsored Links
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
That will also work on windows if you run it from the command line.

Joined: Aug 2003
Posts: 160
ST
Offline
Junior Member
Junior Member
Offline
Joined: Aug 2003
Posts: 160
anyword on if I am using ssh? I fond out that telnet is disabled on new site as well.

Anyone know the commnad ot restore a file from ssh?

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
It would be the same as for telnet. They're just different protocols for accessing the shell.

Joined: Aug 2003
Posts: 160
ST
Offline
Junior Member
Junior Member
Offline
Joined: Aug 2003
Posts: 160
so is this literally what I would type in?:
Code
<br />$ mysql -u daddygee -p password ashes < e:\forum\ashes.sql<br />


Is that all that is neccessary to restore the tables?

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Yes, provided that "daddygee" is a MySQL user with the necessary grants to access the database "ashes".

With that form of the command, you'll be prompted for daddygee's password. That's more secure than specifying the password in the command.

You should first check that the database "ashes" exists, and that it has no tables, in case ashes.sql is missing the commands to drop any existing tables.

P.S. The "$" is the shell command prompt, so you wouldn't actually type that.

Sponsored Links
Joined: Aug 2003
Posts: 160
ST
Offline
Junior Member
Junior Member
Offline
Joined: Aug 2003
Posts: 160
well what I did was backup all the tables and it made a file called ashes.sql.

So I dont type in the "password" i the initial command?
it would look exactly like I posted above minus the "$"?

Thank you so much.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Actually I think the syntax is

-ppassword

(no space between the -p and the actual password

If you just put -p and leave the password out of the command, as Dave suggests, you'll be prompted for the password.

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Letting the command prompt you for the password is more secure, since it avoids having the password stored in the command log. I only insert the password in the command line if I'm running it non-interactively (from a script).

ST: Just try it and see if it works. The only way it could hurt anything would be if you typed in the name of the wrong database, which could overwrite that database.

Joined: Aug 2003
Posts: 160
ST
Offline
Junior Member
Junior Member
Offline
Joined: Aug 2003
Posts: 160
allright.. when I get home I will try it. Thank you very much.

Joined: Aug 2003
Posts: 160
ST
Offline
Junior Member
Junior Member
Offline
Joined: Aug 2003
Posts: 160
Here is my exact syntax:
Code
<br />mysql -u aschelonn -p <E:Forum\ashes.sql


It tells me

[]E:Forumashes.sql: No such file or directory[/]

I am trying to upload my file from MY HD to the server.

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Is your server Linux? I asked you that earlier, but you didn't answer it.

Upload your file? That mysql command reads the file ashes.sql from the local file system, so obviously the file has to be on the server.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
No the SQL file would need to be on the server....

Then after the < you'd put the path to that file. /home/user/whatever/ashes.sql

It won't upload it from your local machine.


Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Doah - didn't see Dave's answer before - it was on another page. My reply was a bogus post.

Joined: Aug 2003
Posts: 160
ST
Offline
Junior Member
Junior Member
Offline
Joined: Aug 2003
Posts: 160
Is there a way to get it uploaded fomr local machine?

And it is Linux.. sorry Dave.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Just use FTP - the same way you normally transfer your threads file to copy the database up.

Joined: Aug 2003
Posts: 160
ST
Offline
Junior Member
Junior Member
Offline
Joined: Aug 2003
Posts: 160
damn this is difficult. I can see the difference now in threads over classic; one sure does not need to go threough all this grief to move hosts with classic. But I looove threads... Oh well.

I uploaded the backup.sql file to the server. I am getting the same error with the query.
Code
<br />mysql -u aschelonn -p </aschelonn/database/outofashes.sql
that is. file not found....

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
It's not difficult, you're just making it more complicated than it really is.

You left out the database name on the command line. But that might not be what's causing the error. Are you sure that's the correct path to the input file? What happens if you type:

ls -l /aschelonn/database/outofashes.sql

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Is there a space between < and / ?

Is the file named backup.sql or outofashes.sql or ashes.sql

It's not too tough - I'm just confused as to what the real information is.

Is /aschelonn/dataase/outofashes.sql the complete path to the file, from the server's root.

If you cd into the directory where the backup file is.... you don't need to worry about the path.

mysql -u aschelonn -p < whatever.sql


But it might be the lack of a space after the < is causing you trouble.

Think of it like an arrow.... you're putting whatever.sql into the database.

Joined: Aug 2003
Posts: 160
ST
Offline
Junior Member
Junior Member
Offline
Joined: Aug 2003
Posts: 160
Code
 <br />mysql -u aschelonn -p </aschelonn/database/outofashes.sql

I double checked and that is the precise code I entered.

I am trying it again from a different client. I will add spaces where needed.

Last edited by ST; 09/23/2003 10:19 PM.
Joined: Aug 2003
Posts: 160
ST
Offline
Junior Member
Junior Member
Offline
Joined: Aug 2003
Posts: 160
I think my problem is on multiple levels.

  • my bacup file is a *.sql file and my restore procedure is looking for *.somethingelse.
  • I have no telnet or ssh from server A (where my stuff is now).
  • I only have ssh or ftp on my new host.


I did the last suggestion and it finally asked me for my password, its the farthest I ever got, but it keeps saying I have no rights to the files.

How much would it cost to get one of you guru's to do it for me? It seems that this is just way beyond me. Maybe its juts because I have the flu....

Joined: Aug 2003
Posts: 160
ST
Offline
Junior Member
Junior Member
Offline
Joined: Aug 2003
Posts: 160
Oooh.. I think I had a breakthrough.... but now another question.

When I get the tables moved over, is there a way to get only the posts moved so I dont lose anything? or do I have to move all the tables all over again? I just want to keep all posts when I move.



Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
You do not want to keep users? All your posts would be assigned to anonymous. Also how bout boards these all tie in with posts.

You would clear

Joined: Aug 2003
Posts: 160
ST
Offline
Junior Member
Junior Member
Offline
Joined: Aug 2003
Posts: 160
and one more question... this procedure is transferring the tables only... all I gotta do next is install threads over top of that right?

Joined: Aug 2003
Posts: 160
ST
Offline
Junior Member
Junior Member
Offline
Joined: Aug 2003
Posts: 160
[]Omegatron said:
You do not want to keep users? All your posts would be assigned to anonymous. Also how bout boards these all tie in with posts.

You would clear [/]
I meant after all the tables are moved, is there a way ic an get just the posts after this is all done to add to the alrady existing tables that I am working on moving right now.... I am certain more posts were done duing thsi time.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
You need to lay threads down and configure it to connect to that database. Run any altertables needed in order to upgrade the database.

IC you are saying is there a way to backup just posts as you have not shut off your board yet.

Well the simplest way is the one done above. A whole backup takes mere minutes if that to install via commandline. You run the altertables and your done.

I would work on configuring you new software the way you want it. Then when all is running good shut down your current board and restore the database and run the proper altertables. You will be good to go.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
mysql -u aschelonn -p < /aschelonn/database/outofashes.sql

Just curious but usually there is a space between when I do this command which you see I placed above after the <

Joined: Aug 2003
Posts: 160
ST
Offline
Junior Member
Junior Member
Offline
Joined: Aug 2003
Posts: 160
yeah, I added the space... but I still could not get it to work. I %^&3ed with phpmyadmin from the new host and I think I got it to aprtially work. Now it seems to not want to load the p-u files.

Oh well.

What are the alerttabeles I need to run?

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
St,

There is not reason if you can telnet or ssh in that the above command will not work.

Some hosts require the password to be typed on the same line as is what you see in Infopop's directions.

My host requires the -p and then you enter the password after.

mysql -u USERNAME -p DBNAME < /PATH/TO/BACKUPFILE.sql

DBNAME is the name of an existing database, and USERNAME is a MySQL user with the following privileges for that database: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER. Any existing content in the database will be discarded.

Joined: Aug 2003
Posts: 160
ST
Offline
Junior Member
Junior Member
Offline
Joined: Aug 2003
Posts: 160
Thanks a mill Omegatron. I am at work presently and will no doubt try that in about an hour when I get home.

PHP admin was set to time out in 300 seconds and I was trying to upload the entire table base in one chunk adn it was timing out all the time. They finally told me That I could break up the *.sql file inot smaller bites and I tried that. I all seemed to go fine except for the ratings and users tables. I will play with that a little bit and then go back to the code in SSH and insert the password in the line.

I sure hope one of them works.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
You notice in my line you do not enter the password just -p

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
1) That "file not found" error you posted suggests that the problem is that you're not specifying the right path for the .sql file you're trying to import. But you didn't reply to my suggestion about using the "ls" command to check that.

I don't think it matters whether there's a space after the "<".

2) To verify that the mysql command is available, and that the MySQL user has (at least partial) access to the database, you could try the following, and see if you get any error messages. The black text is your input, the red text is the output and should look similar to this:

Code
[:"red"]~$[/] mysql -u DBUSER -p <br />[:"red"]Enter password:[/] PASSWORD <br />[:"red"]Welcome to the MySQL monitor.  Commands end with ; or \g. <br />Your MySQL connection id is 572779 to server version: 3.23.56 <br /> <br />Type 'help;' or '\h' for help. Type '\c' to clear the buffer. <br />>[/] use DBNAME <br />[:"red"]Reading table information for completion of table and column names <br />You can turn off this feature to get a quicker startup with -A <br /> <br />Database changed <br />mysql>[/] show tables; <br />[:"red"](this output should indicate that there are no tables in this database) <br /> <br />mysql>[/] quit; <br />[:"red"]Bye <br />~$[/] 



Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 808
Joined: July 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,825
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 1383
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 13
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)